﻿using System;

namespace Shuba.Model
{
    [Serializable]
    public class BranchTargetInfo
    {
        public BranchTargetInfo()
        {
        }

        /// <summary>
        /// Branch Target Plan Info
        /// </summary>
        public BranchTargetInfo(string BranchID, string BranchName, string TargetYear, Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate, string TARGET_MONTH)
        {
            this._BranchID = BranchID;
            this.BranchName = BranchName;
            this.TargetYear = TargetYear;
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
            this.TARGET_MONTH = TARGET_MONTH;
        }

        /// <summary>
        /// Branch Target Plan Info Tmp
        /// </summary>
        public BranchTargetInfo(string BranchID, string BranchName, string TargetYear, Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate, string ActType, string TARGET_MONTH)
        {
            this._BranchID = BranchID;
            this.BranchName = BranchName;
            this.TargetYear = TargetYear;
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
            this.ActType = ActType;
            this.TARGET_MONTH = TARGET_MONTH;
        }

        /// <summary>
        /// Branch Target Plan Info List
        /// </summary>
        public BranchTargetInfo(string _MonthID, string _MonthName, Int64 _TargetAmount, Int32 _Noa, Int64 _TargetAmountReal, Int32 _NoaReal)
        {
            this.MonthID = _MonthID;
            this.MonthName = _MonthName;
            this.TargetAmount = _TargetAmount;
            this.Noa = _Noa;
            this.TargetAmountReal = _TargetAmountReal;
            this.NoaReal = _NoaReal;
        }

        public BranchTargetInfo(string _TargetYear, string _BranchID, string _BranchName, Int64 _TargetAmount, Int32 _Noa, Int64 _TargetAmountReal, Int32 _NoaReal)
        {
            this.TargetYear = _TargetYear;
            this.BranchID = _BranchID;
            this.BranchName = _BranchName;
            this.TargetAmount = _TargetAmount;
            this.Noa = _Noa;
            this.TargetAmountReal = _TargetAmountReal;
            this.NoaReal = _NoaReal;
        }

        private string _BranchID = "";
        public string BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }
        public string TargetYear { get; set; }
        public string TARGET_MONTH { get; set; }

        public string MonthID{ get; set; }
        public string MonthName { get; set; }

        public string BranchName { get; set; }
        public Int64 TargetAmount { get; set; }
        public Int32 Noa { get; set; }
        public Int64 TargetAmountReal { get; set; }
        public Int32 NoaReal { get; set; }

        public string EntryBy { get; set; }
        private DateTime _EntryDate = DateTime.Now;
        public DateTime EntryDate
        {
            get { return _EntryDate; }
            set { _EntryDate = value; }
        }
        public string UpdateBy { get; set; }

        private DateTime _UpdateDate = DateTime.Now;
        public DateTime UpdateDate
        {
            get { return _UpdateDate; }
            set { _UpdateDate = value; }
        }
        public string ActType { get; set; }
        public override string ToString()
        {
            return _BranchID + " - " + BranchName + " - " + TargetYear + " - " + TargetAmount.ToString() + " - " + Noa.ToString() + " - " + EntryBy + " - " + _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + " - " + UpdateBy + " - " + _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }

        public string ToString4Audit()
        {
            return "ID: " + _BranchID + ", NAME: " + BranchName + ", TARGET_YEAR: " + TargetYear + ", TARGET_AMOUNT: " + TargetAmount.ToString() + ", NOA: " + Noa.ToString() + ", ENTRY_BY: " + EntryBy + ", ENTRY_DT: " + _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + ", UPDATE_BY: " + UpdateBy + ", UPDATE_DT: " + _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }
    }
}
